/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package EA_Model.IEC61970.Meas.impl;

import EA_Model.IEC61970.Meas.MeasPackage;
import EA_Model.IEC61970.Meas.Quality61850;
import EA_Model.IEC61970.Meas.Validity;

import EA_Model.IEC61970.SCADA.Source;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Quality61850</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link EA_Model.IEC61970.Meas.impl.Quality61850Impl#getBadReference <em>Bad Reference</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Meas.impl.Quality61850Impl#getEstimatorReplaced <em>Estimator Replaced</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Meas.impl.Quality61850Impl#getFailure <em>Failure</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Meas.impl.Quality61850Impl#getOldData <em>Old Data</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Meas.impl.Quality61850Impl#getOperatorBlocked <em>Operator Blocked</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Meas.impl.Quality61850Impl#getOscillatory <em>Oscillatory</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Meas.impl.Quality61850Impl#getOutOfRange <em>Out Of Range</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Meas.impl.Quality61850Impl#getOverFlow <em>Over Flow</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Meas.impl.Quality61850Impl#getSource <em>Source</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Meas.impl.Quality61850Impl#getSuspect <em>Suspect</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Meas.impl.Quality61850Impl#getTest <em>Test</em>}</li>
 *   <li>{@link EA_Model.IEC61970.Meas.impl.Quality61850Impl#getValidity <em>Validity</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class Quality61850Impl extends EObjectImpl implements Quality61850 {
	/**
	 * The cached value of the '{@link #getBadReference() <em>Bad Reference</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getBadReference()
	 * @generated
	 * @ordered
	 */
	protected EA_Model.IEC61970.Domain.Boolean badReference;

	/**
	 * The cached value of the '{@link #getEstimatorReplaced() <em>Estimator Replaced</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEstimatorReplaced()
	 * @generated
	 * @ordered
	 */
	protected EA_Model.IEC61970.Domain.Boolean estimatorReplaced;

	/**
	 * The cached value of the '{@link #getFailure() <em>Failure</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getFailure()
	 * @generated
	 * @ordered
	 */
	protected EA_Model.IEC61970.Domain.Boolean failure;

	/**
	 * The cached value of the '{@link #getOldData() <em>Old Data</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getOldData()
	 * @generated
	 * @ordered
	 */
	protected EA_Model.IEC61970.Domain.Boolean oldData;

	/**
	 * The cached value of the '{@link #getOperatorBlocked() <em>Operator Blocked</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getOperatorBlocked()
	 * @generated
	 * @ordered
	 */
	protected EA_Model.IEC61970.Domain.Boolean operatorBlocked;

	/**
	 * The cached value of the '{@link #getOscillatory() <em>Oscillatory</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getOscillatory()
	 * @generated
	 * @ordered
	 */
	protected EA_Model.IEC61970.Domain.Boolean oscillatory;

	/**
	 * The cached value of the '{@link #getOutOfRange() <em>Out Of Range</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getOutOfRange()
	 * @generated
	 * @ordered
	 */
	protected EA_Model.IEC61970.Domain.Boolean outOfRange;

	/**
	 * The cached value of the '{@link #getOverFlow() <em>Over Flow</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getOverFlow()
	 * @generated
	 * @ordered
	 */
	protected EA_Model.IEC61970.Domain.Boolean overFlow;

	/**
	 * The default value of the '{@link #getSource() <em>Source</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSource()
	 * @generated
	 * @ordered
	 */
	protected static final Source SOURCE_EDEFAULT = Source.PROCESS;

	/**
	 * The cached value of the '{@link #getSource() <em>Source</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSource()
	 * @generated
	 * @ordered
	 */
	protected Source source = SOURCE_EDEFAULT;

	/**
	 * The cached value of the '{@link #getSuspect() <em>Suspect</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSuspect()
	 * @generated
	 * @ordered
	 */
	protected EA_Model.IEC61970.Domain.Boolean suspect;

	/**
	 * The cached value of the '{@link #getTest() <em>Test</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTest()
	 * @generated
	 * @ordered
	 */
	protected EA_Model.IEC61970.Domain.Boolean test;

	/**
	 * The default value of the '{@link #getValidity() <em>Validity</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getValidity()
	 * @generated
	 * @ordered
	 */
	protected static final Validity VALIDITY_EDEFAULT = Validity.GOOD;

	/**
	 * The cached value of the '{@link #getValidity() <em>Validity</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getValidity()
	 * @generated
	 * @ordered
	 */
	protected Validity validity = VALIDITY_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected Quality61850Impl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return MeasPackage.Literals.QUALITY61850;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean getBadReference() {
		if (badReference != null && badReference.eIsProxy()) {
			InternalEObject oldBadReference = (InternalEObject)badReference;
			badReference = (EA_Model.IEC61970.Domain.Boolean)eResolveProxy(oldBadReference);
			if (badReference != oldBadReference) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, MeasPackage.QUALITY61850__BAD_REFERENCE, oldBadReference, badReference));
			}
		}
		return badReference;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean basicGetBadReference() {
		return badReference;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setBadReference(EA_Model.IEC61970.Domain.Boolean newBadReference) {
		EA_Model.IEC61970.Domain.Boolean oldBadReference = badReference;
		badReference = newBadReference;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MeasPackage.QUALITY61850__BAD_REFERENCE, oldBadReference, badReference));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean getEstimatorReplaced() {
		if (estimatorReplaced != null && estimatorReplaced.eIsProxy()) {
			InternalEObject oldEstimatorReplaced = (InternalEObject)estimatorReplaced;
			estimatorReplaced = (EA_Model.IEC61970.Domain.Boolean)eResolveProxy(oldEstimatorReplaced);
			if (estimatorReplaced != oldEstimatorReplaced) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, MeasPackage.QUALITY61850__ESTIMATOR_REPLACED, oldEstimatorReplaced, estimatorReplaced));
			}
		}
		return estimatorReplaced;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean basicGetEstimatorReplaced() {
		return estimatorReplaced;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setEstimatorReplaced(EA_Model.IEC61970.Domain.Boolean newEstimatorReplaced) {
		EA_Model.IEC61970.Domain.Boolean oldEstimatorReplaced = estimatorReplaced;
		estimatorReplaced = newEstimatorReplaced;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MeasPackage.QUALITY61850__ESTIMATOR_REPLACED, oldEstimatorReplaced, estimatorReplaced));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean getFailure() {
		if (failure != null && failure.eIsProxy()) {
			InternalEObject oldFailure = (InternalEObject)failure;
			failure = (EA_Model.IEC61970.Domain.Boolean)eResolveProxy(oldFailure);
			if (failure != oldFailure) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, MeasPackage.QUALITY61850__FAILURE, oldFailure, failure));
			}
		}
		return failure;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean basicGetFailure() {
		return failure;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setFailure(EA_Model.IEC61970.Domain.Boolean newFailure) {
		EA_Model.IEC61970.Domain.Boolean oldFailure = failure;
		failure = newFailure;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MeasPackage.QUALITY61850__FAILURE, oldFailure, failure));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean getOldData() {
		if (oldData != null && oldData.eIsProxy()) {
			InternalEObject oldOldData = (InternalEObject)oldData;
			oldData = (EA_Model.IEC61970.Domain.Boolean)eResolveProxy(oldOldData);
			if (oldData != oldOldData) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, MeasPackage.QUALITY61850__OLD_DATA, oldOldData, oldData));
			}
		}
		return oldData;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean basicGetOldData() {
		return oldData;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setOldData(EA_Model.IEC61970.Domain.Boolean newOldData) {
		EA_Model.IEC61970.Domain.Boolean oldOldData = oldData;
		oldData = newOldData;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MeasPackage.QUALITY61850__OLD_DATA, oldOldData, oldData));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean getOperatorBlocked() {
		if (operatorBlocked != null && operatorBlocked.eIsProxy()) {
			InternalEObject oldOperatorBlocked = (InternalEObject)operatorBlocked;
			operatorBlocked = (EA_Model.IEC61970.Domain.Boolean)eResolveProxy(oldOperatorBlocked);
			if (operatorBlocked != oldOperatorBlocked) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, MeasPackage.QUALITY61850__OPERATOR_BLOCKED, oldOperatorBlocked, operatorBlocked));
			}
		}
		return operatorBlocked;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean basicGetOperatorBlocked() {
		return operatorBlocked;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setOperatorBlocked(EA_Model.IEC61970.Domain.Boolean newOperatorBlocked) {
		EA_Model.IEC61970.Domain.Boolean oldOperatorBlocked = operatorBlocked;
		operatorBlocked = newOperatorBlocked;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MeasPackage.QUALITY61850__OPERATOR_BLOCKED, oldOperatorBlocked, operatorBlocked));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean getOscillatory() {
		if (oscillatory != null && oscillatory.eIsProxy()) {
			InternalEObject oldOscillatory = (InternalEObject)oscillatory;
			oscillatory = (EA_Model.IEC61970.Domain.Boolean)eResolveProxy(oldOscillatory);
			if (oscillatory != oldOscillatory) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, MeasPackage.QUALITY61850__OSCILLATORY, oldOscillatory, oscillatory));
			}
		}
		return oscillatory;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean basicGetOscillatory() {
		return oscillatory;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setOscillatory(EA_Model.IEC61970.Domain.Boolean newOscillatory) {
		EA_Model.IEC61970.Domain.Boolean oldOscillatory = oscillatory;
		oscillatory = newOscillatory;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MeasPackage.QUALITY61850__OSCILLATORY, oldOscillatory, oscillatory));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean getOutOfRange() {
		if (outOfRange != null && outOfRange.eIsProxy()) {
			InternalEObject oldOutOfRange = (InternalEObject)outOfRange;
			outOfRange = (EA_Model.IEC61970.Domain.Boolean)eResolveProxy(oldOutOfRange);
			if (outOfRange != oldOutOfRange) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, MeasPackage.QUALITY61850__OUT_OF_RANGE, oldOutOfRange, outOfRange));
			}
		}
		return outOfRange;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean basicGetOutOfRange() {
		return outOfRange;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setOutOfRange(EA_Model.IEC61970.Domain.Boolean newOutOfRange) {
		EA_Model.IEC61970.Domain.Boolean oldOutOfRange = outOfRange;
		outOfRange = newOutOfRange;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MeasPackage.QUALITY61850__OUT_OF_RANGE, oldOutOfRange, outOfRange));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean getOverFlow() {
		if (overFlow != null && overFlow.eIsProxy()) {
			InternalEObject oldOverFlow = (InternalEObject)overFlow;
			overFlow = (EA_Model.IEC61970.Domain.Boolean)eResolveProxy(oldOverFlow);
			if (overFlow != oldOverFlow) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, MeasPackage.QUALITY61850__OVER_FLOW, oldOverFlow, overFlow));
			}
		}
		return overFlow;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean basicGetOverFlow() {
		return overFlow;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setOverFlow(EA_Model.IEC61970.Domain.Boolean newOverFlow) {
		EA_Model.IEC61970.Domain.Boolean oldOverFlow = overFlow;
		overFlow = newOverFlow;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MeasPackage.QUALITY61850__OVER_FLOW, oldOverFlow, overFlow));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Source getSource() {
		return source;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSource(Source newSource) {
		Source oldSource = source;
		source = newSource == null ? SOURCE_EDEFAULT : newSource;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MeasPackage.QUALITY61850__SOURCE, oldSource, source));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean getSuspect() {
		if (suspect != null && suspect.eIsProxy()) {
			InternalEObject oldSuspect = (InternalEObject)suspect;
			suspect = (EA_Model.IEC61970.Domain.Boolean)eResolveProxy(oldSuspect);
			if (suspect != oldSuspect) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, MeasPackage.QUALITY61850__SUSPECT, oldSuspect, suspect));
			}
		}
		return suspect;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean basicGetSuspect() {
		return suspect;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSuspect(EA_Model.IEC61970.Domain.Boolean newSuspect) {
		EA_Model.IEC61970.Domain.Boolean oldSuspect = suspect;
		suspect = newSuspect;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MeasPackage.QUALITY61850__SUSPECT, oldSuspect, suspect));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean getTest() {
		if (test != null && test.eIsProxy()) {
			InternalEObject oldTest = (InternalEObject)test;
			test = (EA_Model.IEC61970.Domain.Boolean)eResolveProxy(oldTest);
			if (test != oldTest) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, MeasPackage.QUALITY61850__TEST, oldTest, test));
			}
		}
		return test;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Boolean basicGetTest() {
		return test;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setTest(EA_Model.IEC61970.Domain.Boolean newTest) {
		EA_Model.IEC61970.Domain.Boolean oldTest = test;
		test = newTest;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MeasPackage.QUALITY61850__TEST, oldTest, test));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Validity getValidity() {
		return validity;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setValidity(Validity newValidity) {
		Validity oldValidity = validity;
		validity = newValidity == null ? VALIDITY_EDEFAULT : newValidity;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, MeasPackage.QUALITY61850__VALIDITY, oldValidity, validity));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case MeasPackage.QUALITY61850__BAD_REFERENCE:
				if (resolve) return getBadReference();
				return basicGetBadReference();
			case MeasPackage.QUALITY61850__ESTIMATOR_REPLACED:
				if (resolve) return getEstimatorReplaced();
				return basicGetEstimatorReplaced();
			case MeasPackage.QUALITY61850__FAILURE:
				if (resolve) return getFailure();
				return basicGetFailure();
			case MeasPackage.QUALITY61850__OLD_DATA:
				if (resolve) return getOldData();
				return basicGetOldData();
			case MeasPackage.QUALITY61850__OPERATOR_BLOCKED:
				if (resolve) return getOperatorBlocked();
				return basicGetOperatorBlocked();
			case MeasPackage.QUALITY61850__OSCILLATORY:
				if (resolve) return getOscillatory();
				return basicGetOscillatory();
			case MeasPackage.QUALITY61850__OUT_OF_RANGE:
				if (resolve) return getOutOfRange();
				return basicGetOutOfRange();
			case MeasPackage.QUALITY61850__OVER_FLOW:
				if (resolve) return getOverFlow();
				return basicGetOverFlow();
			case MeasPackage.QUALITY61850__SOURCE:
				return getSource();
			case MeasPackage.QUALITY61850__SUSPECT:
				if (resolve) return getSuspect();
				return basicGetSuspect();
			case MeasPackage.QUALITY61850__TEST:
				if (resolve) return getTest();
				return basicGetTest();
			case MeasPackage.QUALITY61850__VALIDITY:
				return getValidity();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case MeasPackage.QUALITY61850__BAD_REFERENCE:
				setBadReference((EA_Model.IEC61970.Domain.Boolean)newValue);
				return;
			case MeasPackage.QUALITY61850__ESTIMATOR_REPLACED:
				setEstimatorReplaced((EA_Model.IEC61970.Domain.Boolean)newValue);
				return;
			case MeasPackage.QUALITY61850__FAILURE:
				setFailure((EA_Model.IEC61970.Domain.Boolean)newValue);
				return;
			case MeasPackage.QUALITY61850__OLD_DATA:
				setOldData((EA_Model.IEC61970.Domain.Boolean)newValue);
				return;
			case MeasPackage.QUALITY61850__OPERATOR_BLOCKED:
				setOperatorBlocked((EA_Model.IEC61970.Domain.Boolean)newValue);
				return;
			case MeasPackage.QUALITY61850__OSCILLATORY:
				setOscillatory((EA_Model.IEC61970.Domain.Boolean)newValue);
				return;
			case MeasPackage.QUALITY61850__OUT_OF_RANGE:
				setOutOfRange((EA_Model.IEC61970.Domain.Boolean)newValue);
				return;
			case MeasPackage.QUALITY61850__OVER_FLOW:
				setOverFlow((EA_Model.IEC61970.Domain.Boolean)newValue);
				return;
			case MeasPackage.QUALITY61850__SOURCE:
				setSource((Source)newValue);
				return;
			case MeasPackage.QUALITY61850__SUSPECT:
				setSuspect((EA_Model.IEC61970.Domain.Boolean)newValue);
				return;
			case MeasPackage.QUALITY61850__TEST:
				setTest((EA_Model.IEC61970.Domain.Boolean)newValue);
				return;
			case MeasPackage.QUALITY61850__VALIDITY:
				setValidity((Validity)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case MeasPackage.QUALITY61850__BAD_REFERENCE:
				setBadReference((EA_Model.IEC61970.Domain.Boolean)null);
				return;
			case MeasPackage.QUALITY61850__ESTIMATOR_REPLACED:
				setEstimatorReplaced((EA_Model.IEC61970.Domain.Boolean)null);
				return;
			case MeasPackage.QUALITY61850__FAILURE:
				setFailure((EA_Model.IEC61970.Domain.Boolean)null);
				return;
			case MeasPackage.QUALITY61850__OLD_DATA:
				setOldData((EA_Model.IEC61970.Domain.Boolean)null);
				return;
			case MeasPackage.QUALITY61850__OPERATOR_BLOCKED:
				setOperatorBlocked((EA_Model.IEC61970.Domain.Boolean)null);
				return;
			case MeasPackage.QUALITY61850__OSCILLATORY:
				setOscillatory((EA_Model.IEC61970.Domain.Boolean)null);
				return;
			case MeasPackage.QUALITY61850__OUT_OF_RANGE:
				setOutOfRange((EA_Model.IEC61970.Domain.Boolean)null);
				return;
			case MeasPackage.QUALITY61850__OVER_FLOW:
				setOverFlow((EA_Model.IEC61970.Domain.Boolean)null);
				return;
			case MeasPackage.QUALITY61850__SOURCE:
				setSource(SOURCE_EDEFAULT);
				return;
			case MeasPackage.QUALITY61850__SUSPECT:
				setSuspect((EA_Model.IEC61970.Domain.Boolean)null);
				return;
			case MeasPackage.QUALITY61850__TEST:
				setTest((EA_Model.IEC61970.Domain.Boolean)null);
				return;
			case MeasPackage.QUALITY61850__VALIDITY:
				setValidity(VALIDITY_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case MeasPackage.QUALITY61850__BAD_REFERENCE:
				return badReference != null;
			case MeasPackage.QUALITY61850__ESTIMATOR_REPLACED:
				return estimatorReplaced != null;
			case MeasPackage.QUALITY61850__FAILURE:
				return failure != null;
			case MeasPackage.QUALITY61850__OLD_DATA:
				return oldData != null;
			case MeasPackage.QUALITY61850__OPERATOR_BLOCKED:
				return operatorBlocked != null;
			case MeasPackage.QUALITY61850__OSCILLATORY:
				return oscillatory != null;
			case MeasPackage.QUALITY61850__OUT_OF_RANGE:
				return outOfRange != null;
			case MeasPackage.QUALITY61850__OVER_FLOW:
				return overFlow != null;
			case MeasPackage.QUALITY61850__SOURCE:
				return source != SOURCE_EDEFAULT;
			case MeasPackage.QUALITY61850__SUSPECT:
				return suspect != null;
			case MeasPackage.QUALITY61850__TEST:
				return test != null;
			case MeasPackage.QUALITY61850__VALIDITY:
				return validity != VALIDITY_EDEFAULT;
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (source: ");
		result.append(source);
		result.append(", validity: ");
		result.append(validity);
		result.append(')');
		return result.toString();
	}

} //Quality61850Impl
